package fragments;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.administrator.baseproject.BaseFragment;
import com.example.administrator.newxlmedical.FingerprintEnterActivity;
import com.example.administrator.newxlmedical.IrisEnterActivity;
import com.example.administrator.newxlmedical.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import constants.Constants;
import utils.ActivityUtil;
import utils.ToastUtil;

/**
 * Created by Administrator on 2018/7/27.
 */

public class FasterLoginFragment extends Fragment {

    @BindView(R.id.tv_enter_fingerprint_enter)
    TextView tvEnterFingerprintEnter;
    @BindView(R.id.tv_enter_iris_enter)
    TextView tvEnterIrisEnter;
    Unbinder unbinder;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_login_faster, null);

        unbinder = ButterKnife.bind(this, view);
        return view;
    }


    @OnClick({R.id.tv_enter_fingerprint_enter, R.id.tv_enter_iris_enter})
    public void onViewClicked(View view) {
            switch (view.getId()) {
                case R.id.tv_enter_fingerprint_enter:
                    ActivityUtil.jumpToActivity(getActivity(), FingerprintEnterActivity.class);
                    break;
                case R.id.tv_enter_iris_enter:
                    ActivityUtil.jumpToActivity(getActivity(), IrisEnterActivity.class);
                    break;
//            case R.id.ll_enter:
////                allHandler.sendEmptyMessage(HandlerConstant.TEST);
//                count++;
//                if (count == 8) {
//                    finish();
//                }
//                break;
//            case R.id.ll_enter_log:
//                count_log++;
//                if (count_log == 8) {
//                    Constants.CHECK_LOG = true;
//                    ToastUtil.showToast(EnterActivity.this, "log模式开启");
//                }
//                break;
            }
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
